/*
 * 消息实体
 */
package com.haiyi.software.entity;

public class HiChatMessage {

	public static final int CHATMESSAGE_MINE = 1;// 我的消息
	public static final int CHATMESSAGE_PERSON = 2;// 对方的消息
	public static final int CHATMESSAGE_SYS = 3;// 系统消息

	/**
	 * The content of the message
	 */
	EntityMsg message;
	/**
	 * boolean to determine, who is sender of this message
	 */
	boolean isMine;
	/**
	 * boolean to determine, whether the message is a status message or not. it
	 * reflects the changes/updates about the sender is writing, have entered
	 * text etc
	 */
	boolean isStatusMessage;

	/*
	 * 消息的类型
	 */
	int whoseMessage;

	public int getWhoseMessage() {
		return whoseMessage;
	}

	public void setWhoseMessage(int messageType) {
		this.whoseMessage = messageType;
	}

	/**
	 * Constructor to make a Message object
	 */
	public HiChatMessage(EntityMsg message, int msgtype) {

		this.message = message;
		this.whoseMessage = msgtype;
		// this.isStatusMessage = false;
	}

	/**
	 * Constructor to make a status Message object consider the parameters are
	 * swaped from default Message constructor, not a good approach but have to
	 * go with it.
	 */
	// public HiChatMessage(boolean status, String message) {
	// super();
	// this.message = message;
	// this.isMine = false;
	// this.isStatusMessage = status;
	// }

	public EntityMsg getMessage() {
		return message;
	}

	public void setMessage(EntityMsg message) {
		this.message = message;
	}

	public boolean isMine() {
		return isMine;
	}

	public void setMine(boolean isMine) {
		this.isMine = isMine;
	}

	public boolean isStatusMessage() {
		return isStatusMessage;
	}

	public void setStatusMessage(boolean isStatusMessage) {
		this.isStatusMessage = isStatusMessage;
	}

}
